import request from './request'

export const getEpisodes = (params) => {
  return request({
    url: '/episode/list',
    params
  })
}

export const getShows = (params) => {
  return request({
    url: '/episode/shows',
    params
  })
}

export const addEpisode = (data) => {
  return request({
    url: '/episode/add',
    method: 'post',
    data
  })
}

export const editEpisode = (data) => {
  return request({
    url: '/episode/edit',
    method: 'post',
    data
  })
}

export const deleteEpisode = (id) => {
  return request({
    url: `/episode/delete/${id}`
  })
}

export const refreshEpisode = (id) => {
  return request({
    url: `/episode/refresh/${id}`
  })
}
